package com.shuqi.controller;

import android.content.Context;

import com.shuqi.interfaces.IEventListener;
import com.shuqi.model.AccountBindModel;
import com.shuqi.model.AccountRegisterModel;

/**
 * 
 * @author liyizhe 注册账号的controller，包含 手机号绑定，邮箱
 */
public class AccountRegisterController extends ControllerBase {


    private AccountRegisterModel model; // 绑定账号的model

    public AccountRegisterController(Context context) {
        model = new AccountRegisterModel(context);
    }

    @Override
    public void addEventListener(IEventListener listener) {
        model.addEventListener(listener);
    }

    @Override
    public void handle(int eventType, Object... objs) {
        switch (eventType) {
            case EVENT_LOADPAGE:
                model.loadData(objs);
                break;

            default:
                break;
        }
    }


    @Override
    public void onDestroy() {
        if (model != null) {
            model.onDestroy();
        }
    }
}
